<?php

	class QReportCell extends QBaseClass {
		/**
		 * TODO
		 * Overwrite __get and __set methods to set these variables 
		 * properly
		 */
		public $intColumn;
		public $intRow;
		public $intColumnSpan;
		public $intRowSpan;

		protected $mixCellContent;
		protected $objCellStyle;

		public function __construct($mixCellContent, $objCellStyle = null, $intColumnSpan = 1, $intRowSpan = 1) {
			$this->mixCellContent = $mixCellContent;
			$this->objCellStyle = $objCellStyle;
			$this->intColumnSpan = $intColumnSpan;
			$this->intRowSpan = $intRowSpan;
		}

		public function Render() {
			return $this->mixCellContent;
		}

		public function GetAttributes() {
			$strToReturn = "";
			if(!is_null($this->objCellStyle)) {
				$strToReturn .= $this->objCellStyle->GetAttributes();
			}

			if($this->intColumnSpan > 1) {
				$strToReturn .= sprintf('colspan="%d" ',$this->intColumnSpan);
			}

			if($this->intRowSpan > 1) {
				$strToReturn .= sprintf('rowspan="%d" ',$this->intRowSpan);
			}

			return $strToReturn;
		}
	}
